package com.adz.ezdemo;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.adz.ezdemo.scan.main.CaptureActivity;
import com.videogo.exception.BaseException;
import com.videogo.openapi.EZOpenSDK;
import com.videogo.openapi.bean.EZDeviceInfo;

import java.util.List;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        EZOpenSDK.getInstance().setAccessToken("at.6ns3zt828bsrq92x6rynawnrahki69c4-5mkrjzrlzp-0h48rdn-kvqehvt6o");
//        new Thread(new Runnable() {
//            @Override
//            public void run() {
//                try {
//                    List<EZDeviceInfo> result = null;
//                    result = EZOpenSDK.getInstance().getDeviceList(0, 10);
//                } catch (BaseException e) {
//                }
//            }
//        }).start();

        Button btn= (Button) findViewById(R.id.btn_test);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this, CaptureActivity.class);
                startActivity(intent);
            }
        });
    }


}
